const shortcuts = [
  {
    text: "今天",
    value: ()=>{
      const temp = new Date();
      return [new Date(temp.setHours(0,0,0,0)), new Date(temp.setHours(23,59,59,0))]
    }
  },
  {
    text: "昨天",
    value: ()=>{
      const temp = new Date();
      temp.setTime(temp.getTime() - 3600 * 1000 * 24)
      return [new Date(temp.setHours(0,0,0,0)), new Date(temp.setHours(23,59,59,0))]
    }
  },
  {
    text: "最近一周",
    value: ()=>{
      const temp = new Date();
      temp.setTime(temp.getTime() - 3600 * 1000 * 24 * 7)
      return [new Date(temp.setHours(0,0,0,0)), new Date(new Date().setHours(23,59,59,0))]
    }
  },
  {
    text: "本月",
    value: ()=>{
      const start = new Date();
      start.setDate(1);
      const end = new Date();
      return [new Date(start.setHours(0,0,0,0)),new Date(end.setHours(23,59,59,0))]
    }
  },
  {
    text: "上个月",
    value: ()=>{
      const start = new Date();
      start.setDate(0)
      start.setDate(1)
      const end = new Date();
      end.setDate(0);
      return [new Date(start.setHours(0,0,0,0)),new Date(end.setHours(23,59,59,0))]
    }
  },
  {
    text: "最近半月",
    value: ()=>{
      const temp = new Date();
      temp.setTime(temp.getTime() - 3600 * 1000 * 24 * 15)
      return [new Date(temp.setHours(0,0,0,0)), new Date(new Date().setHours(23,59,59,0))]
    }
  },
  {
    text: "最近一个月",
    value: ()=>{
      const temp = new Date();
      temp.setTime(temp.getTime() - 3600 * 1000 * 24 * 30)
      return [new Date(temp.setHours(0,0,0,0)), new Date(new Date().setHours(23,59,59,0))]
    }
  },
  {
    text: "最近三个月",
    value: ()=>{
      const temp = new Date();
      temp.setTime(temp.getTime() - 3600 * 1000 * 24 * 90)
      return [new Date(temp.setHours(0,0,0,0)), new Date(new Date().setHours(23,59,59,0))]
    }
  },
  {
    text: "最近半年",
    value: ()=>{
      const temp = new Date();
      temp.setTime(temp.getTime() - 3600 * 1000 * 24 * 183)
      return [new Date(temp.setHours(0,0,0,0)), new Date(new Date().setHours(23,59,59,0))]
    }
  },
]

export { shortcuts }